3.2.58 \(\int \cos ^4(a+b x) \cot ^4(a+b x) \, dx\) [158]

Optimal. Leaf size=80 \[ \frac {35 x}{8}+\frac {35 \cot (a+b x)}{8 b}-\frac {35 \cot ^3(a+b x)}{24 b}+\frac {7 \cos ^2(a+b x) \cot ^3(a+b x)}{8 b}+\frac {\cos ^4(a+b x) \cot ^3(a+b x)}{4 b} \]

[Out]

35/8*x+35/8*cot(b*x+a)/b-35/24*cot(b*x+a)^3/b+7/8*cos(b*x+a)^2*cot(b*x+a)^3/b+1/4*cos(b*x+a)^4*cot(b*x+a)^3/b

________________________________________________________________________________________

Rubi [A]
time = 0.04, antiderivative size = 80, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 4, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.235, Rules used = {2671, 294, 308, 209} \begin {gather*} -\frac {35 \cot ^3(a+b x)}{24 b}+\frac {35 \cot (a+b x)}{8 b}+\frac {\cos ^4(a+b x) \cot ^3(a+b x)}{4 b}+\frac {7 \cos ^2(a+b x) \cot ^3(a+b x)}{8 b}+\frac {35 x}{8} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Cos[a + b*x]^4*Cot[a + b*x]^4,x]

[Out]

(35*x)/8 + (35*Cot[a + b*x])/(8*b) - (35*Cot[a + b*x]^3)/(24*b) + (7*Cos[a + b*x]^2*Cot[a + b*x]^3)/(8*b) + (C
os[a + b*x]^4*Cot[a + b*x]^3)/(4*b)

Rule 209

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*ArcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 294

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[c^(n - 1)*(c*x)^(m - n + 1)*((a + b*x^
n)^(p + 1)/(b*n*(p + 1))), x] - Dist[c^n*((m - n + 1)/(b*n*(p + 1))), Int[(c*x)^(m - n)*(a + b*x^n)^(p + 1), x
], x] /; FreeQ[{a, b, c}, x] && IGtQ[n, 0] && LtQ[p, -1] && GtQ[m + 1, n] &&  !ILtQ[(m + n*(p + 1) + 1)/n, 0]
&& IntBinomialQ[a, b, c, n, m, p, x]

Rule 308

Int[(x_)^(m_)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Int[PolynomialDivide[x^m, a + b*x^n, x], x] /; FreeQ[{a,
b}, x] && IGtQ[m, 0] && IGtQ[n, 0] && GtQ[m, 2*n - 1]

Rule 2671

Int[sin[(e_.) + (f_.)*(x_)]^(m_)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> With[{ff = FreeFactors[Ta
n[e + f*x], x]}, Dist[b*(ff/f), Subst[Int[(ff*x)^(m + n)/(b^2 + ff^2*x^2)^(m/2 + 1), x], x, b*(Tan[e + f*x]/ff
)], x]] /; FreeQ[{b, e, f, n}, x] && IntegerQ[m/2]

Rubi steps

\begin {align*} \int \cos ^4(a+b x) \cot ^4(a+b x) \, dx &=-\frac {\text {Subst}\left (\int \frac {x^8}{\left (1+x^2\right )^3} \, dx,x,\cot (a+b x)\right )}{b}\\ &=\frac {\cos ^4(a+b x) \cot ^3(a+b x)}{4 b}-\frac {7 \text {Subst}\left (\int \frac {x^6}{\left (1+x^2\right )^2} \, dx,x,\cot (a+b x)\right )}{4 b}\\ &=\frac {7 \cos ^2(a+b x) \cot ^3(a+b x)}{8 b}+\frac {\cos ^4(a+b x) \cot ^3(a+b x)}{4 b}-\frac {35 \text {Subst}\left (\int \frac {x^4}{1+x^2} \, dx,x,\cot (a+b x)\right )}{8 b}\\ &=\frac {7 \cos ^2(a+b x) \cot ^3(a+b x)}{8 b}+\frac {\cos ^4(a+b x) \cot ^3(a+b x)}{4 b}-\frac {35 \text {Subst}\left (\int \left (-1+x^2+\frac {1}{1+x^2}\right ) \, dx,x,\cot (a+b x)\right )}{8 b}\\ &=\frac {35 \cot (a+b x)}{8 b}-\frac {35 \cot ^3(a+b x)}{24 b}+\frac {7 \cos ^2(a+b x) \cot ^3(a+b x)}{8 b}+\frac {\cos ^4(a+b x) \cot ^3(a+b x)}{4 b}-\frac {35 \text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\cot (a+b x)\right )}{8 b}\\ &=\frac {35 x}{8}+\frac {35 \cot (a+b x)}{8 b}-\frac {35 \cot ^3(a+b x)}{24 b}+\frac {7 \cos ^2(a+b x) \cot ^3(a+b x)}{8 b}+\frac {\cos ^4(a+b x) \cot ^3(a+b x)}{4 b}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.21, size = 53, normalized size = 0.66 \begin {gather*} \frac {420 (a+b x)-32 \cot (a+b x) \left (-10+\csc ^2(a+b x)\right )+72 \sin (2 (a+b x))+3 \sin (4 (a+b x))}{96 b} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Cos[a + b*x]^4*Cot[a + b*x]^4,x]

[Out]

(420*(a + b*x) - 32*Cot[a + b*x]*(-10 + Csc[a + b*x]^2) + 72*Sin[2*(a + b*x)] + 3*Sin[4*(a + b*x)])/(96*b)

________________________________________________________________________________________

Maple [A]
time = 0.11, size = 94, normalized size = 1.18

method result size
derivativedivides \(\frac {-\frac {\cos ^{9}\left (b x +a \right )}{3 \sin \left (b x +a \right )^{3}}+\frac {2 \left (\cos ^{9}\left (b x +a \right )\right )}{\sin \left (b x +a \right )}+2 \left (\cos ^{7}\left (b x +a \right )+\frac {7 \left (\cos ^{5}\left (b x +a \right )\right )}{6}+\frac {35 \left (\cos ^{3}\left (b x +a \right )\right )}{24}+\frac {35 \cos \left (b x +a \right )}{16}\right ) \sin \left (b x +a \right )+\frac {35 b x}{8}+\frac {35 a}{8}}{b}\) \(94\)
default \(\frac {-\frac {\cos ^{9}\left (b x +a \right )}{3 \sin \left (b x +a \right )^{3}}+\frac {2 \left (\cos ^{9}\left (b x +a \right )\right )}{\sin \left (b x +a \right )}+2 \left (\cos ^{7}\left (b x +a \right )+\frac {7 \left (\cos ^{5}\left (b x +a \right )\right )}{6}+\frac {35 \left (\cos ^{3}\left (b x +a \right )\right )}{24}+\frac {35 \cos \left (b x +a \right )}{16}\right ) \sin \left (b x +a \right )+\frac {35 b x}{8}+\frac {35 a}{8}}{b}\) \(94\)
risch \(\frac {35 x}{8}-\frac {i {\mathrm e}^{4 i \left (b x +a \right )}}{64 b}-\frac {3 i {\mathrm e}^{2 i \left (b x +a \right )}}{8 b}+\frac {3 i {\mathrm e}^{-2 i \left (b x +a \right )}}{8 b}+\frac {i {\mathrm e}^{-4 i \left (b x +a \right )}}{64 b}+\frac {4 i \left (6 \,{\mathrm e}^{4 i \left (b x +a \right )}-9 \,{\mathrm e}^{2 i \left (b x +a \right )}+5\right )}{3 b \left ({\mathrm e}^{2 i \left (b x +a \right )}-1\right )^{3}}\) \(108\)
norman \(\frac {-\frac {1}{24 b}+\frac {35 \left (\tan ^{2}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{24 b}+\frac {63 \left (\tan ^{4}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{8 b}+\frac {35 \left (\tan ^{6}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{8 b}-\frac {35 \left (\tan ^{8}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{8 b}-\frac {63 \left (\tan ^{10}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{8 b}-\frac {35 \left (\tan ^{12}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{24 b}+\frac {\tan ^{14}\left (\frac {b x}{2}+\frac {a}{2}\right )}{24 b}+\frac {35 x \left (\tan ^{3}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{8}+\frac {35 x \left (\tan ^{5}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{2}+\frac {105 x \left (\tan ^{7}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{4}+\frac {35 x \left (\tan ^{9}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{2}+\frac {35 x \left (\tan ^{11}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{8}}{\left (1+\tan ^{2}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )^{4} \tan \left (\frac {b x}{2}+\frac {a}{2}\right )^{3}}\) \(216\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(b*x+a)^8/sin(b*x+a)^4,x,method=_RETURNVERBOSE)

[Out]

1/b*(-1/3/sin(b*x+a)^3*cos(b*x+a)^9+2/sin(b*x+a)*cos(b*x+a)^9+2*(cos(b*x+a)^7+7/6*cos(b*x+a)^5+35/24*cos(b*x+a
)^3+35/16*cos(b*x+a))*sin(b*x+a)+35/8*b*x+35/8*a)

________________________________________________________________________________________

Maxima [A]
time = 0.51, size = 75, normalized size = 0.94 \begin {gather*} \frac {105 \, b x + 105 \, a + \frac {105 \, \tan \left (b x + a\right )^{6} + 175 \, \tan \left (b x + a\right )^{4} + 56 \, \tan \left (b x + a\right )^{2} - 8}{\tan \left (b x + a\right )^{7} + 2 \, \tan \left (b x + a\right )^{5} + \tan \left (b x + a\right )^{3}}}{24 \, b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x+a)^8/sin(b*x+a)^4,x, algorithm="maxima")

[Out]

1/24*(105*b*x + 105*a + (105*tan(b*x + a)^6 + 175*tan(b*x + a)^4 + 56*tan(b*x + a)^2 - 8)/(tan(b*x + a)^7 + 2*
tan(b*x + a)^5 + tan(b*x + a)^3))/b

________________________________________________________________________________________

Fricas [A]
time = 0.36, size = 89, normalized size = 1.11 \begin {gather*} -\frac {6 \, \cos \left (b x + a\right )^{7} + 21 \, \cos \left (b x + a\right )^{5} - 140 \, \cos \left (b x + a\right )^{3} - 105 \, {\left (b x \cos \left (b x + a\right )^{2} - b x\right )} \sin \left (b x + a\right ) + 105 \, \cos \left (b x + a\right )}{24 \, {\left (b \cos \left (b x + a\right )^{2} - b\right )} \sin \left (b x + a\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x+a)^8/sin(b*x+a)^4,x, algorithm="fricas")

[Out]

-1/24*(6*cos(b*x + a)^7 + 21*cos(b*x + a)^5 - 140*cos(b*x + a)^3 - 105*(b*x*cos(b*x + a)^2 - b*x)*sin(b*x + a)
 + 105*cos(b*x + a))/((b*cos(b*x + a)^2 - b)*sin(b*x + a))

________________________________________________________________________________________

Sympy [A]
time = 1.38, size = 141, normalized size = 1.76 \begin {gather*} \begin {cases} \frac {35 x \sin ^{4}{\left (a + b x \right )}}{8} + \frac {35 x \sin ^{2}{\left (a + b x \right )} \cos ^{2}{\left (a + b x \right )}}{4} + \frac {35 x \cos ^{4}{\left (a + b x \right )}}{8} + \frac {35 \sin ^{3}{\left (a + b x \right )} \cos {\left (a + b x \right )}}{8 b} + \frac {175 \sin {\left (a + b x \right )} \cos ^{3}{\left (a + b x \right )}}{24 b} + \frac {7 \cos ^{5}{\left (a + b x \right )}}{3 b \sin {\left (a + b x \right )}} - \frac {\cos ^{7}{\left (a + b x \right )}}{3 b \sin ^{3}{\left (a + b x \right )}} & \text {for}\: b \neq 0 \\\frac {x \cos ^{8}{\left (a \right )}}{\sin ^{4}{\left (a \right )}} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x+a)**8/sin(b*x+a)**4,x)

[Out]

Piecewise((35*x*sin(a + b*x)**4/8 + 35*x*sin(a + b*x)**2*cos(a + b*x)**2/4 + 35*x*cos(a + b*x)**4/8 + 35*sin(a
 + b*x)**3*cos(a + b*x)/(8*b) + 175*sin(a + b*x)*cos(a + b*x)**3/(24*b) + 7*cos(a + b*x)**5/(3*b*sin(a + b*x))
 - cos(a + b*x)**7/(3*b*sin(a + b*x)**3), Ne(b, 0)), (x*cos(a)**8/sin(a)**4, True))

________________________________________________________________________________________

Giac [A]
time = 3.72, size = 68, normalized size = 0.85 \begin {gather*} \frac {105 \, b x + 105 \, a + \frac {3 \, {\left (11 \, \tan \left (b x + a\right )^{3} + 13 \, \tan \left (b x + a\right )\right )}}{{\left (\tan \left (b x + a\right )^{2} + 1\right )}^{2}} + \frac {8 \, {\left (9 \, \tan \left (b x + a\right )^{2} - 1\right )}}{\tan \left (b x + a\right )^{3}}}{24 \, b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x+a)^8/sin(b*x+a)^4,x, algorithm="giac")

[Out]

1/24*(105*b*x + 105*a + 3*(11*tan(b*x + a)^3 + 13*tan(b*x + a))/(tan(b*x + a)^2 + 1)^2 + 8*(9*tan(b*x + a)^2 -
 1)/tan(b*x + a)^3)/b

________________________________________________________________________________________

Mupad [B]
time = 1.58, size = 56, normalized size = 0.70 \begin {gather*} \frac {35\,x}{8}+\frac {{\cos \left (a+b\,x\right )}^4\,\left (\frac {35\,{\mathrm {tan}\left (a+b\,x\right )}^6}{8}+\frac {175\,{\mathrm {tan}\left (a+b\,x\right )}^4}{24}+\frac {7\,{\mathrm {tan}\left (a+b\,x\right )}^2}{3}-\frac {1}{3}\right )}{b\,{\mathrm {tan}\left (a+b\,x\right )}^3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(a + b*x)^8/sin(a + b*x)^4,x)

[Out]

(35*x)/8 + (cos(a + b*x)^4*((7*tan(a + b*x)^2)/3 + (175*tan(a + b*x)^4)/24 + (35*tan(a + b*x)^6)/8 - 1/3))/(b*
tan(a + b*x)^3)

________________________________________________________________________________________